home *** CD-ROM | disk | FTP | other *** search
- { Show Mixed 16 --> 256 Colors }
-
- uses Txt,VGA16;
-
- { ─────────────── ShowColor ─────────────── }
- procedure ShowColor(Ty,X,Y,LenX,LenY:integer);
- const Pattern:array[0..3,0..3] of byte=(
- ($55,$AA,$55,$AA),($55,$00,$AA,$00),
- ($44,$11,$44,$11),($44,$00,$11,$00));
- var I,J,L,Size:integer;
- A,B:array[0..5000] of byte;
- begin
- L:=LenX shr 3; Size:=L*LenY;
- for I:=0 to LenY-1 do FillChar(A[L*I],L,Pattern[Ty,I and 3]);
- for I:=0 to 15 do for J:=0 to 15 do begin
- Conv1to4(A,B,Size,J,I);
- Put(X+LenX*J,Y+LenY*I,LenX,LenY,B);
- end;
- end;
-
- var I,K:integer;
- Font1:array[0..5000] of byte;
- begin
- FileRead('0814one.fnt',0,96,14,Font1);
- SetFont(8,14,32,Font1);
- SetMode(4);
- Bar(0, 0,640, 20,9);
- Bar(0, 20,640,440,1);
- Bar(0,460,640, 20,9);
- Print(16, 3,15,9,'Show Mixed 16 --> 256 Colors');
- Print(16,463,15,9,'Press any key...');
- for I:=0 to 3 do begin
- ShowColor(I,120,45,24,24);
- K:=Key;
- end;
- SetMode(0);
- end.
-